﻿using Core.Audit;
using Core.Domain.Contracts;
using Core.Migrations.Extensions;
using FluentMigrator;

namespace Infrastructure.Persistence.Migrations.Audits;

[Migration(202510121401)]
public class CreateTable : ForwardOnlyMigration
{
    public override void Up()
    {
        Create.Table(MigrationExpressions.TableNameFor<AuditTrail>())
           .InSchema(SchemaNames.Identity)
           .WithColumn(typeof(AuditTrail).GetColumnName(nameof(IEntity<Guid>.Id)))
           .AsGuid().PrimaryKey().WithColumnDescription("主键");
    }
}
